<template>
    <div class="gathering">
        <div class="data-content">
            <Form :model="formdata" label-position="right" :label-width="160">
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9" class="pt30">
                        <FormItem label="最小买入手数：" prop="num_min">
                            <Input v-model="formdata.num_min"/>
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9" class="pt30">
                        <FormItem label="最大买入手数：" prop="num_max">
                            <Input v-model="formdata.num_max"/>
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9" class="pt30">
                        <FormItem label="单股可用额度百分比：" prop="money_percent">
                            <Input v-model="formdata.money_percent"/> %
                        </FormItem>
                    </Col>
                    <Col span="15" class="c999 ercode">
                        <p>百分比数值，在1-100之间</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9" class="pt30">
                        <FormItem label="账户资金预警：" prop="lower_cash">
                            当可用资金低于 <Input v-model="formdata.lower_cash"/> 时提示用户
                        </FormItem>
                    </Col>
                    <Col span="15" class="c999 ercode">
                        <p>建议数值在0-200之间</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9" class="pt30">
                        <FormItem label="亏损警戒百分比：" prop="warning_precent">
                            <Input v-model="formdata.warning_precent"/> %
                        </FormItem>
                    </Col>
                    <Col span="15" class="c999 ercode">
                        <p>会员亏损达到保证金的该百分比时,将警戒</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9" class="pt30">
                        <FormItem label="亏损平仓百分比：" prop="baocang_precent">
                            <Input v-model="formdata.baocang_precent"/> %
                        </FormItem>
                    </Col>
                    <Col span="15" class="c999 ercode">
                        <p>会员亏损达到保证金的该百分比时,将平仓</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9" class="pt30">
                        <FormItem label="炒股大赛开关：" prop="config_match_on">
                            <Select v-model="formdata.config_match_on" placeholder="">
                                <Option value="off">关闭</Option>
                                <Option value="on">开启</Option>
                            </Select>
                        </FormItem>
                    </Col>
                    <Col span="15" class="c999 ercode">
                        <p>控制开关，是否开启炒股大赛,并在自动在每月1日创建最新炒股赛程</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9" class="pt30">
                        <FormItem label="每日更新排名：" prop="config_match_update_time">
                            <Select v-model="formdata.config_match_update_time" placeholder="">
                                <Option value="off">关闭</Option>
                                <Option value="on">开启</Option>
                            </Select>
                        </FormItem>
                    </Col>
                    <Col span="15" class="c999 ercode">
                        <p>每日更新排名开启后系统会在每天的15：00-15：30 这段时间进行排名更新，届时需要自动任务配合</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9" class="pt30">
                        <FormItem label="每期炒股大赛结束日期：" prop="config_match_day">
                            <Input v-model="formdata.config_match_day"/> %
                        </FormItem>
                    </Col>
                    <Col span="15" class="c999 ercode">
                        <p>每期炒股大赛的结束日期，为1-28的任意整数</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9" class="pt30">
                        <FormItem label="模拟排名：" prop="fictitious">
                            <Select v-model="formdata.fictitious" placeholder="">
                                <Option value="off">关闭</Option>
                                <Option value="on">开启</Option>
                            </Select>
                        </FormItem>
                    </Col>
                    <Col span="15" class="c999 ercode">
                        <p>虚拟排名的开启，以供炒股大赛排名系统测试</p>
                    </Col>
                </Row>

                <FormItem>
                    <Button type="primary" @click="handleSubmit()" :loading="send_loading">确定</Button>
                </FormItem>

            </Form>

        </div>
    </div>
</template>
<style>
    .gathering .c999 p{
        line-height: 27px;
    }
    .gathering .ivu-form-item{
        margin-bottom: 0;
    }
    .gathering .ivu-input-wrapper ,.gathering .ivu-select{
        width: 250px;
    }
</style>
<script>
    import WrapperContent from '../../../components/wrapper-content.vue'
    import {
        getUserList,
        getUser,
        getLevelList,
        getPositionList,
        doUserInfo,
        delUser,
        changeUserState
    } from "@/api/user";
    import * as utils from '../../../assets/js/utils'
    import $ from 'jquery'
    import _ from 'lodash'

    export default {
        components: {
            WrapperContent
        },
        data() {
            return {
                loading: false,
                formdata: {
                    num_min:'',
                    num_max:'',
                    money_percent:'',
                    lower_cash:'',
                    warning_precent:'',
                    baocang_precent:'',
                    config_match_on:'off',
                    config_match_update_time:'off',
                    config_match_day:'',
                    fictitious:'off',
                },
                send_loading: false,
            }
        },
        created: function () {
            this.loading = false;
        },
        methods: {
            handleSubmit() {
                this.send_loading = true;
                setTimeout(() => {
                    this.send_loading = false;
                }, 2000)
            },
        }
    }
</script>





























